/* Class39_Sub5_Sub4_Sub5 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */

public class Class39_Sub5_Sub4_Sub5 extends Renderable {
	public int anInt2320;
	public int anInt2321;
	public int anInt2322;
	public int anInt2323;
	public static Class7 aClass7_2324 = new Class7(50);
	public Class39_Sub5_Sub11 aClass39_Sub5_Sub11_2325;
	public static int anInt2326;
	public static JString aClass3_2327;
	public static JString aClass3_2328;
	public static JString aClass3_2329;
	public static JString aClass3_2330 = Class39_Sub5_Sub9.createJString(113, " more options");
	public static long aLong2331;
	public static JString aClass3_2332;
	public boolean aBoolean2333 = false;
	public static int anInt2334;
	public static JString aClass3_2335;
	public int anInt2336;
	public static Class39_Sub5_Sub10_Sub4 aClass39_Sub5_Sub10_Sub4_2337;
	public static int openSidebarInterface;
	public static JString aClass3_2339 = Class39_Sub5_Sub9.createJString(118, "titlebutton");
	public static JString aClass3_2340;
	public static JString aClass3_2341 = (Class39_Sub5_Sub9.createJString(107, "sind fehlgeschlagen)3 Bitte warten Sie 5 Minuten)1"));
	public static boolean aBoolean2342;
	public static JString aClass3_2343;
	public static JString aClass3_2344;
	public static JString aClass3_2345;
	public static JString aClass3_2346;
	public int anInt2347;
	public static JString aClass3_2348;
	public int anInt2349 = 0;
	public static JString aClass3_2350;
	public static JString aClass3_2351;
	public int anInt2352 = 0;
	public static JString aClass3_2353;

	public static void method530(int i, int i_0_) {
		if (i_0_ != -1 && Renderable.aBooleanArray1727[i_0_] && Class62_Sub1.interfaceCache[i_0_] != null) {
			for (int i_1_ = 0; i_1_ < (Class62_Sub1.interfaceCache[i_0_]).length; i_1_++) {
				RSInterface class39_sub5_sub17 = (Class62_Sub1.interfaceCache[i_0_][i_1_]);
				if (class39_sub5_sub17 != null)
					class39_sub5_sub17.anInt2049 = class39_sub5_sub17.anInt1998;
			}
		}
	}

	public static void method531(byte i) {
		aClass3_2330 = null;
		aClass3_2346 = null;
		aClass3_2341 = null;
		aClass3_2353 = null;
		aClass3_2328 = null;
		aClass3_2327 = null;
		aClass3_2329 = null;
		aClass3_2344 = null;
		aClass3_2351 = null;
		aClass3_2335 = null;
		aClass3_2343 = null;
		aClass39_Sub5_Sub10_Sub4_2337 = null;
		aClass3_2340 = null;
		aClass3_2348 = null;
		aClass3_2350 = null;
		aClass7_2324 = null;
		aClass3_2345 = null;
		aClass3_2339 = null;
		aClass3_2332 = null;
	}

	public void method532(int i, int i_2_) {
		if (!aBoolean2333) {
			anInt2349 += i;
			while (anInt2349 > aClass39_Sub5_Sub11_2325.anIntArray1831[anInt2352]) {
				anInt2349 -= aClass39_Sub5_Sub11_2325.anIntArray1831[anInt2352];
				anInt2352++;
				if (anInt2352 >= aClass39_Sub5_Sub11_2325.anIntArray1833.length) {
					aBoolean2333 = true;
					break;
				}
			}
		}
	}

	public static void updatePlayerMovement(int i) {
		Class39_Sub5_Sub11.inputStream.initBitAccess();
		int i_3_ = Class39_Sub5_Sub11.inputStream.readBits(1);
		if (i_3_ != 0) {
			if (i != 0)
				method536(-52, null, 48);
			int i_4_ = Class39_Sub5_Sub11.inputStream.readBits(2);
			if (i_4_ == 0)
				Class39_Sub9.anIntArray1400[Class57_Sub2.anInt1586++] = 2047;
			else if (i_4_ == 1) {
				int i_5_ = Class39_Sub5_Sub11.inputStream.readBits(3);
				Class7.aClass39_Sub5_Sub4_Sub4_Sub2_109.method518(i - 1, i_5_, false);
				int i_6_ = Class39_Sub5_Sub11.inputStream.readBits(1);
				if (i_6_ == 1)
					Class39_Sub9.anIntArray1400[Class57_Sub2.anInt1586++] = 2047;
			} else if (i_4_ == 2) {
				int i_7_ = Class39_Sub5_Sub11.inputStream.readBits(3);
				Class7.aClass39_Sub5_Sub4_Sub4_Sub2_109.method518(-1, i_7_, true);
				int i_8_ = Class39_Sub5_Sub11.inputStream.readBits(3);
				Class7.aClass39_Sub5_Sub4_Sub4_Sub2_109.method518(-1, i_8_, true);
				int i_9_ = Class39_Sub5_Sub11.inputStream.readBits(1);
				if (i_9_ == 1)
					Class39_Sub9.anIntArray1400[Class57_Sub2.anInt1586++] = 2047;
			} else if (i_4_ == 3) {
				int i_10_ = Class39_Sub5_Sub11.inputStream.readBits(7);
				int i_11_ = Class39_Sub5_Sub11.inputStream.readBits(1);
				if (i_11_ == 1)
					Class39_Sub9.anIntArray1400[Class57_Sub2.anInt1586++] = 2047;
				Class11.currentPlane = Class39_Sub5_Sub11.inputStream.readBits(2);
				int i_12_ = Class39_Sub5_Sub11.inputStream.readBits(7);
				int i_13_ = Class39_Sub5_Sub11.inputStream.readBits(1);
				Class7.aClass39_Sub5_Sub4_Sub4_Sub2_109.method508(i_12_, i_13_ == 1, (byte) 10, i_10_);
			}
		}
	}

	public static void method534(int i) {
		for (;;) {
			Class39_Sub9 class39_sub9;
			synchronized (RSSocket.aClass49_304) {
				class39_sub9 = (Class39_Sub9) Class19.aClass49_365.method965((byte) 52);
			}
			if (class39_sub9 == null)
				break;
			class39_sub9.aClass9_Sub1_1406.method173(class39_sub9.aByteArray1404, (int) class39_sub9.hash, false, class39_sub9.aClass6_1409, (byte) -80);
		}
	}

	public static void method535(byte i, int i_14_) {
		CacheArchive.anInt1302 = i_14_;
	}

	public Model method489(boolean bool) {
		Class39_Sub5_Sub18 class39_sub5_sub18 = Class40.method881(0, anInt2320);
		if (bool != true)
			method535((byte) -14, -80);
		Model class39_sub5_sub4_sub6;
		if (!aBoolean2333)
			class39_sub5_sub4_sub6 = class39_sub5_sub18.method778(180, anInt2352);
		else
			class39_sub5_sub4_sub6 = class39_sub5_sub18.method778(180, -1);
		if (class39_sub5_sub4_sub6 == null)
			return null;
		return class39_sub5_sub4_sub6;
	}

	public static JString method536(int i, Stream class39_sub6, int i_15_) {
		try {
			JString class3 = new JString();
			if (i != 0)
				method534(17);
			class3.length = class39_sub6.readByteOrShort();
			if (class3.length > i_15_)
				class3.length = i_15_;
			class3.characters = new byte[class3.length];
			class39_sub6.currentOffset += Login.aClass40_472.method885(0, class3.characters, class3.length, class39_sub6.currentOffset, class39_sub6.buffer, i + 38);
			return class3;
		} catch (Exception exception) {
			return Canvas_Sub1.aClass3_20;
		}
	}

	public Class39_Sub5_Sub4_Sub5(int i, int i_16_, int i_17_, int i_18_, int i_19_, int i_20_, int i_21_) {
		anInt2322 = i_16_;
		anInt2323 = i_17_;
		anInt2321 = i_18_;
		anInt2347 = i_19_;
		anInt2336 = i_20_ + i_21_;
		anInt2320 = i;
		int i_22_ = Class40.method881(0, anInt2320).anInt2126;
		if (i_22_ == -1)
			aBoolean2333 = true;
		else {
			aBoolean2333 = false;
			aClass39_Sub5_Sub11_2325 = Class62_Sub1.method1064(i_22_, (byte) 54);
		}
	}

	static {
		aClass3_2332 = Class39_Sub5_Sub9.createJString(110, "Enter name:");
		anInt2326 = 2301979;
		openSidebarInterface = -1;
		aClass3_2344 = Class39_Sub5_Sub9.createJString(120, "Keine Antwort vom Anmelde)2Server)3");
		aClass3_2328 = Class39_Sub5_Sub9.createJString(112, "Mem:");
		aClass3_2340 = aClass3_2332;
		aClass3_2346 = aClass3_2330;
		aClass3_2335 = Class39_Sub5_Sub9.createJString(126, "Absender:");
		aClass3_2351 = Class39_Sub5_Sub9.createJString(121, "Loading ignore list");
		aLong2331 = 0L;
		aClass3_2329 = Class39_Sub5_Sub9.createJString(110, "Sichtbare Karte vorbereitet)3");
		aClass3_2350 = Class39_Sub5_Sub9.createJString(116, "Close");
		aClass3_2348 = Class39_Sub5_Sub9.createJString(106, "Stufe)2");
		aClass3_2353 = aClass3_2351;
		aClass3_2345 = Class39_Sub5_Sub9.createJString(113, "Please reload this page)3");
		aClass3_2327 = aClass3_2345;
		aClass3_2343 = aClass3_2350;
	}
}
